home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Tools 4
/
Amiga Tools 4.iso
/
tools
/
internet-tools
/
internet-install-tools
/
varknet3
/
net3.lha
/
AmiTCP-4.0
/
doc
/
netutil.doc
< prev
next >
Wrap
Text File
|
1994-10-28
|
64KB
|
1,480 lines
TABLE OF CONTENTS
netutil.doc/arp
netutil.doc/finger
netutil.doc/hostname
netutil.doc/ifconfig
netutil.doc/inetd
netutil.doc/letnet
netutil.doc/login
netutil.doc/ls
netutil.doc/offline
netutil.doc/online
netutil.doc/passwd
netutil.doc/ping
netutil.doc/portmap
netutil.doc/resolve
netutil.doc/route
netutil.doc/rpcinfo
netutil.doc/rsh
netutil.doc/traceroute
netutil.doc/whoami
netutil.doc/arp netutil.doc/arp
NAME
Arp - address resolution display and control
SYNOPSIS
arp hostname
arp -a [netname | hostname]
arp -d hostname
arp -s hostname address [temp] [pub]
arp -f filename
DESCRIPTION
Arp displays and modifies the Internet to hardware address
translation tables used by the Address Resolution Protocol. The
hardware address is a hexadecimal string with each octet separated
by a colon, for instance 0:12:ff:a. The length of the address must
be correct for the specified interface.
OPTIONS
none If no options are specified (first form above), arp displays
the current ARP entry for hostname. The hostname must either
appear in the hostname database (SEE hosts), or be a DARPA
Internet address expressed in Internet standard "dot
notation". Hostname can also be resolved by nameserver.
-a Display all current ARP entries by reading the address mapping
table of the specified (sub)network. `Hostname' is used to as
default network specifier.
-d If an ARP entry exists for the host called hostname, delete
it. [This requires super-user privileges.]
-s Create an ARP entry for the host called hostname with the
hardware station address address. The hardware station address
is given as hexadecimal bytes separated by colons. If an ARP
entry already exists for hostname, the existing entry is
updated with the new information. The entry is permanent
unless the word temp is given in the command. If the word pub
is specified, the entry is published, which means that this
system will act as an ARP server responding to requests for
hostname even though the host address is not its own.
-f Read file filename and set multiple entries in the ARP tables.
Entries in the file should be of the form:
hostname address [temp] [pub]
Argument meanings are the same as for the -s option.
AUTHOR
Arp was developed by the University of California, Berkeley, for the
BSD Unix system.
SEE ALSO
ifconfig, netif.protocols/arp, "net/if_arp.h"
netutil.doc/finger netutil.doc/finger
NAME
finger - user information lookup program
VERSION
$Id: finger.c,v 6.12 1994/10/04 18:26:21 jraja Exp $
SYNOPSIS
finger [-lmsp] [user ...] [user@host ...]
DESCRIPTION
The finger displays information about the system users.
Options are:
-s Finger displays the user's login name, real name, login time
and host, office location and office phone number.
Login time is displayed as month, day, hours and minutes,
unless more than six months ago, in which case the year is
displayed rather than the hours and minutes.
Unknown hosts as well as nonexistent login time are
displayed as single asterisks.
-l Produces a multi-line format displaying the user's login name,
real name, the user's home directory, home phone number, login
shell, and the contents of the files `.forward', `.plan' and
`.project' from the user's home directory.
Phone numbers specified as eleven digits are printed as
`+N-NNN- NNN-NNNN'. Numbers specified as ten or seven digits
are printed as the appropriate subset of that string. Numbers
specified as five digits are printed as `xN-NNNN'.
-p Prevents the -l option of finger from displaying the contents
of the `.forward', `.plan' and `.project' files.
-m Prevent matching of user names. User is usually a login name;
however, matching will also be done on the users' real names,
unless the -m option is supplied. All name matching performed
by finger is case insensitive.
If no options are specified, finger defaults to the -l style output
if operands are provided, otherwise to the -s style. Note that some
fields may be missing, in either format, if information is not
available for them.
If no arguments are specified, finger will print an entry for each
user currently logged into the system.
Finger may be used to look up users on a remote machine. The format
is to specify a user as `user@host', or `@host', where the default
output format for the former is the -l style, and the default output
format for the latter is the -s style. The -l option is the only
option that may be passed to a remote machine.
SEE ALSO
in.fingerd
HISTORY
The finger command appeared in 3.0BSD.
netutil.doc/hostname netutil.doc/hostname
NAME
hostname - print name of current host system
TEMPLATE
hostname [-s=SHORT]
DESCRIPTION
Hostname prints the name of the current host.
Options:
-s Trims off any domain information from the printed name.
SEE ALSO
bsdsocket.library/gethostname()
HISTORY
The hostname command appeared in 4.2BSD.
netutil.doc/ifconfig netutil.doc/ifconfig
NAME
ifconfig - configure network interface parameters
VERSION
$Id: ifconfig.c,v 4.1 1994/10/04 18:28:12 jraja Exp $
SYNOPSIS
ifconfig interface address_family [address [dest_address]] [params]
ifconfig interface [address_family]
DESCRIPTION
ifconfig is used to assign an address to a network interface and/or
configure network interface parameters. ifconfig must be used at
boot time to define the network address of each interface present on
a machine. It can also be used at other times to redefine an
interface's address or other operating parameters.
PARAMETERS
interface A string of the interface name concatenated with unit
numver, for example `eth0'. The AmiTCP/IP network
interfaces are defined in the `AmiTCP:db/interface'
file. For example, a interface sl corresponds by
default to `Devs:networks/rhcslip.device'.
address_family
Name of protocol on which naming scheme is based. An
interface can receive transmissions in differing
protocols, each of which may require separate naming
schemes. Therefore, it is necessary to specify the
address_family, which may affect interpretation of the
remaining parameters on the command line. The only
address family currently supported is inet (DARPA-
Internet family).
address Either a host name present in the host name database,
(SEE hosts), or a DARPA Internet address
expressed in Internet standard "dot notation". The
host number can be omitted on 10-Mbyte/second Ethernet
interfaces (which use the hardware physical address),
and on interfaces other than the first.
dest_address Address of destination system. Consists of either a
host name present in the host name database, hosts(4),
or a DARPA Internet address expressed in Internet
standard "dot notation".
SWITCHES
The following operating parameters can be specified:
up Mark an interface "up". Enables interface after an
"ifconfig down." Occurs automatically when setting the
address on an interface. Setting this flag has no
effect if the hardware is "down".
down Mark an interface "down". When an interface is marked
"down", the system will not attempt to transmit
messages through that interface. If possible, the
interface will be reset to disable reception as well.
This action does not automatically disable routes
using the interface.
arp Enable the use of Address Resolution Protocol in
mapping between network level addresses and link-level
addresses (default).
-arp Disable the use of Address Resolution Protocol.
metric n Set the routing metric of the interface to n, default
0. The routing metric is used by the routing protocol
(see gated). Higher metrics have the effect of making
a route less favorable; metrics are counted as
additional hops to the destination network or host.
debug Enable driver-dependent debugging code. This usually
turns on extra console error logging.
-debug Disable driver-dependent debugging code.
netmask mask (Inet only) Specify how much of the address to reserve
for subdividing networks into sub-networks. mask
includes the network part of the local address, and
the subnet part which is taken from the host field of
the address. mask can be specified as a single hexa-
decimal number with a leading 0x, with a dot-notation
Internet address, or with a pseudo-network name listed
in the file AmiTCP:db/networks. `mask' contains 1's
for each bit position in the 32-bit address that are
to be used for the network and subnet parts, and 0's
for the host part. mask should contain at least the
standard network portion, and the subnet field should
be contiguous with the network portion.
broadcast (Inet only) Specify the address that represents
broadcasts to the network. The default broadcast
address is the address with a host part of all 1's.
The command:
ifconfig interface/unit
with no optional command arguments supplied displays the current
configuration for interface. If address_family is specified,
ifconfig reports only the details specific to that address family.
DIAGNOSTICS
Messages indicating that the specified interface does not exist, the
requested address is unknown, or the user is not privileged and
tried to alter an interface's configuration.
EXAMPLES
ifconfig lo0 127.0.0.1
This command marks internal loopback device "UP", and
attach an inet address 127.0.0.1 to it.
ifconfig cslip0 inet 193.102.4.144 193.102.4.129
This command starts the CSLIP driver, attach an
address 193.102.4.144 (our internet address) and a
destination address 193.102.4.129 (the internet
address of the host you are connecting) to it.
ifconfig eth0 inet 193.124.100.64 netmask 255.255.255.192 -arp
This command loads an ethernet driver (by default for the
Commodore A2065 Ethernet adapter unit 0), marks it "up",
disables ARP protocol for it, attaches an inet address
193.124.100.65 to it and sets its netmask to
255.255.255.192. A bitwise logical and of netmask and
address for the interface forms a subnet address, in this
case 193.124.100.64. All packets aimed to hosts with same
subnet address (that is hosts 193.124.100.64 -
193.124.100.127) are routed to this interface.
FILES
AmiTCP:db/interfaces
SEE ALSO
netstat, hosts, arp, "net/if.h", "net/sana2tags.h"
netutil.doc/inetd netutil.doc/inetd
NAME
inetd - internet ``super-server''
TEMPLATE
inetd SERVPRI/K/N DEBUG/S CONFIGFILE
DESCRIPTION
Inetd should be run when the AmiTCP/IP protocol stack is started.
Inetd listens for connections on certain internet sockets. When a
connection is found on one of its sockets, it decides what service the
socket corresponds to, and invokes a program to service the request.
After the program is finished, it continues to listen on the socket
(except in some cases which will be described below). Essentially,
inetd allows running one daemon to invoke several others, reducing
load on the system.
PARAMETERS
SERVPRI Process priority for the launched servers. Default is -1.
DEBUG Turns on debugging.
CONFIGFILE Specifies the configuration file name.
CONFIGURATION
Upon execution, inetd reads its configuration information from a
configuration file which, by default, is AmiTCP:db/inetd.conf. There
must be an entry for each field of the configuration file, with
entries for each field separated by a tab or a space. Comments are
denoted by a ``#'' at the beginning of a line or ``;'' anywhere in the
line. There must be an entry for each field. The fields of the
configuration file are as follows:
service name
socket type
protocol
wait/nowait/dos/pri/stack
user
server program
server program name
server program arguments
The service-name entry is the name of a valid service in the
netdatabase. For ``internal'' services (discussed below), the
service name must be the official name of the service.
The socket-type should be one of ``stream'', ``dgram'', ``raw'',
``rdm'', or ``seqpacket'', depending on whether the socket is a
stream, datagram, raw, reliably delivered message, or sequenced
packet socket. Current system supports only stream, datagram and raw
protocols.
The protocol must be a valid protocol as given in netdatabase.
Examples might be ``tcp'' or ``udp''.
The next entry specifies the type of server, its priority, stacksize
and other parameters. The parameters are separated by a slash (`/').
The available parameters are as follows:
WAIT If the server process all incoming connections or datagrams
on a socket and eventually time out, the server is said to
be ``single-threaded'' and should use a ``wait'' entry.
Comsat and talkd are both examples of the this type of
datagram server.
NOWAIT If a datagram server connects to its peer, freeing the
socket so inetd can received further messages on the socket,
it is said to be a ``multi-threaded'' server, and should use
the ``nowait'' entry. If a stream server handles only one
connection, which is accepted by the inetd, it should also
use the ``nowait'' entry.
DOS If the server uses the DOS IO to handle the connection, it
is called a ``naïve'' server, and it should use the ``dos''
entry. If the server is naïve, inetd maps a DOS filehandle
to the incoming connection via TCP: handler (inet-handler).
STACK=nnnn
The default stack size for servers is 16 kilobytes. You can
override the default with this parameter. The minimum stack
size is 4000 bytes.
PRIORITY=p
The task priority for servers is -10 by default. You can
override the default task priority for one server with this
parameter.
The user entry should contain the user name of the user as whom the
server should run. This field is for Unix and future compability
only.
The server-program entry should contain the pathname of the program
which is to be executed by inetd when a request is found on its
socket. If the server program is resident, the path name should be
suppressed. If the server is naïve (ie. using DOS file IO), this
entry should contain the shell name or, if default user shell is to be
used, ``-''. If inetd provides this service internally, this entry
should be ``internal''.
The server-program-name is CLI command name for the server process. It
is shown in the printout of ``status'' command. (Task name of the
server process is the service and the peer address, e.g. ``echo
[192.233.15.19]''.) This and argument entry are optional.
The server program arguments should be just as arguments normally are.
Inetd provides several ``trivial'' services internally by use of
routines within itself. These services are ``echo'', ``discard'',
``chargen'' (character generator), ``daytime'' (human readable time),
and ``time'' (machine readable time, in the form of the number of
seconds since mid night, January 1, 1900). All of these services are
TCP and UDP based. For details of these services, consult the
appropriate RFC from the Network Information Center.
Inetd rereads its configuration file automatically when the
configuration file is changed or when it receives the CTRL-F signal.
Services may be added, deleted or modified when the configuration file
is reread.
HISTORY
The inetd command appeared in 4.3BSD system.
Versions below 4 did not support Amiga DOS IO nor notifications.
BUGS
If the original configuration file is renamed and a new file is
created with old name, no file notification signals are sent. In that
case you should either delete the old (now renamed) file or send CTRL-F
signal to inetd manually.
SEE ALSO
netutil.doc/letnet netutil.doc/letnet
NAME
Letnet - a simple TCP connection tool
SYNOPSIS
letnet HOSTNAME/A,PORT/A
DESCRIPTION
Letnet connects to the specified TCP port at the specified host. The
data read from standard input is sent to the host and data received
from the connection is written to the standard output. Letnet
terminates upon shutdown of the socket or receiving SIGBREAKF_CTRL_C
signal.
ARGUMENTS
HOSTNAME/A
If there is no name service available, hostname may be given
in the Internet dot notation.
PORT/A
The port identifier is searched from the standard services
(SEE ALSO netdb/services) database. A nonstandard
service port may be specified in the numeric form, numbers
between 1---65535 are acceptable.
AUTHOR
Pekka Pessi, the AmiTCP/IP Group, Network Solutions Development Inc.
SEE ALSO
netdb/services, netdb/hosts
netutil.doc/login netutil.doc/login
NAME
login - log into the computer
VERSION
$Id: login.c,v 4.4 1994/10/27 11:32:22 ppessi Exp $
SYNOPSIS
login [-a] [-f] [-p] [-h hostname] [user]
DESCRIPTION
The login utility logs users (and pseudo-users) into the computer
system.
If no user is specified, or if a user is specified and authentication
of the user fails, login prompts for a user name. Authentication of
users is done via passwords.
The options are as follows:
-a The -a option is used when a user is logging in on the
console and wants to get ownership of processes running on
WorkBench. Currently, this is default behauviour.
-f The -f option is used when a user name is specified to
indicate that proper authentication has already been done and
that no password need be requested. This option may only be
used by the super-user or when an already logged in user is
logging in as themselves.
-h The -h option specifies the host from which the connection was
received. It can be used by various daemons such as telnetd.
This option may only be used by the super-user.
-p By default, login discards any previous environment of CLI.
The -p option disables this behavior. This option is
implied by -a option.
If the file `AmiTCP:db/nologin' exists, login dislays its contents to
the user and exits. This is used (by shutdown) to prevent users from
logging in when the system is about to go down.
Immediately after logging a user in, login displays the system
copyright notice, the date and time the user last logged in, the
message of the day as well as other information. If the file
`.hushlogin' exists in the user's home directory, all of these
messages are suppressed. This is to simplify logins for non-human
users, such as uucp. Login then records an entry in the wtmp and utmp
files and executes the user's command interpretor.
Login enters information into the environment specifying the user's
home directory (HOME) and user name (both LOGNAME and USER). It
assigns the directory HOME: to user's home directory.
FILES
AmiTCP:db/motd message-of-the-day
AmiTCP:db/nologin disallows logins
.hushlogin makes login quieter
SEE ALSO
passwd, rlogin, usergroup.library/getpass()
HISTORY
A login command appeared in Version 6 AT&T UNIX.
Previous versions of AmiTCP/IP login set also the environment variable
SHELL.
netutil.doc/ls netutil.doc/ls
NAME
ls - list contents of directory
VERSION
$Id: ls.c,v 4.1 1994/10/04 18:28:12 jraja Exp $
SYNOPSIS
ls [ -acdfgilqrst1ACLFR ] name ...
DESCRIPTION
For each directory argument, ls lists the contents of the directory;
for each file argument, ls repeats its name and any other informa-
tion requested. By default, the output is sorted alphabetically.
When no argument is given, the current directory is listed. When
several arguments are given, the arguments are first sorted appropr-
iately, but file arguments are processed before directories and
their contents.
There are a large number of options:
-l List in long format, giving mode, number of links, owner, size
in bytes, and time of last modification for each file. (See
below.) If the file is a symbolic link the pathname of the
linked-to file is printed preceded by "->".
-g Include the group ownership of the file in a long output.
-t Sort by time modified (latest first) instead of by name.
-a List all entries; in the absence of this option, entries whose
names begin with a period (".") or end with ".info" are not
listed.
-A List all entries except entries whose names end with ".info".
-s Give size in blocks of each file.
-d If argument is a directory, list only its name; often used with
-l to get the status of a directory.
-L If argument is a symbolic link, list the file or directory the
link references rather than the link itself.
-r Reverse the order of sort to get reverse alphabetic or oldest
first as appropriate.
-i For each file, print the key block number in the first column
of the report.
-f Force each argument to be interpreted as a directory and list
the name found in each slot. This option turns off -l, -t, -s,
and -r, and turns on -a; the order is the order in which
entries appear in the directory.
-F Cause directories to be marked with a trailing `/', hard links
sockets with a trailing `#' and symbolic links with a trailing
`@'.
-R Recursively list subdirectories encountered.
-p Include relative pathname into the long listing.
-1 Force one entry per line output format; this is the default
when output is not interactive.
-C Force multi-column output; this is the default when output is
interactive.
-q Force printing of non-graphic characters in file names as the
character `?'; this is the default when output is interactive.
The mode printed under the -l option contains 10 characters which
are interpreted as follows: the first character is
d if the entry is a directory;
r if the entry is a root directory;
l if the entry is a symbolic link;
D if the entry is a hard link to a directory;
p if the entry is a pipe file;
h if the entry is a hard link to a file, or
- if the entry is a plain file.
The next 9 characters are interpreted as three sets of access
control bits. The first set refers to owner permissions; the next
refers to permissions to others in the same user-group; and the last
to all others. Within each set the three characters indicate
permission respectively to read, to write, or to execute the file as
a program. For a directory, `write' and `execute' permissions are
meaningless. The permissions are indicated as follows:
r if the file is readable;
w if the file is writable;
x if the file is executable;
- if the indicated permission is not granted.
The write-permission character is given as a D if the file is
deleteable but not writeable. It is given as a 'W' if the file is
writeable but not deleteable. The group-execute permission character
is given as s if the file has the set-group-id bit set; likewise the
user-execute permission character is given as s if the file has the
set-user-id bit set.
The last character of the mode (normally `x' or `-') is 't' or 'T'
(as sticky in Unix systems) if the pure bit of the mode is on. If
the script bit is on, the last character is 's' or 'S'. The
protection bits `h' and `a' are not printed.
When the sizes of the files in a directory are listed, a total count
of blocks (not including indirect blocks) is printed.
FILES
AmiTCP:db/passwd to get user id's for `ls -l'.
AmiTCP:db/group to get group id's for `ls -g'.
BUGS
The option setting based on whether the output is interactive is
undesirable as "ls -s" is much different than "ls -s > t:file".
The printed protection flags are inadequate for Amiga DOS. The root
directory flags are garbage. There are problems when printing soft
links.
There are too many options.
AUTHOR
Pekka Pessi, <Pekka.Pessi@hut.fi>.
ls is part of the AmiTCP/IP package.
netutil.doc/offline netutil.doc/offline
NAME
Offline - put a SANA-II device offline
TEMPLATE
Offline DEV=DEVICE devicename[unit] [UNIT unit]
DESCRIPTION
Offline sends the S2_OFFLINE command to the given SANA-II device
driver and unit. This command is normally used to disconnect SANA-II
device driver from the network adapter hardware. Device driver does
not accept any more read or write requests.
Device name can be specified either as AmiTCP interface name or as
Exec device name and unit number.
EXAMPLES
This command puts the SLIP offline, which frees then the serial port
to your use.
OFFLINE slip1
NOTES
The offline figures out its identity from its CLI program name.
SEE ALSO
Online, sana2.device/S2_OFFLINE
netutil.doc/online netutil.doc/online
NAME
Online - put a SANA-II device online
TEMPLATE
Online DEV=DEVICE devicename[/unit] [UNIT unit]
DESCRIPTION
Online sends the S2_ONLINE command to the given SANA-II device driver
and unit. The device driver restarts the network adapter hardware and
accepts read and write request again.
Device name can be specified either as AmiTCP interface name or as
Exec device name and unit number.
EXAMPLES
This command puts the Ethernet driver online.
Online ether0
NOTES
The online figures out its identity from its CLI program name.
SEE ALSO
Offline, sana2.device/S2_ONLINE
netutil.doc/passwd netutil.doc/passwd
NAME
passwd - modify a user's password
VERSION
$Id: passwd.c,v 4.1 1994/10/04 18:28:12 jraja Exp $
SYNOPSIS
passwd [user]
FUNCTION
Passwd changes the user's password. First, the user is prompted for
their current password. If the current password is correctly typed, a
new password is requested. The new password must be entered twice to
avoid typing errors.
The new password should be at least six characters long and not purely
alphabetic. Its total length must be less than _PASSWORD_LEN
(currently 128 characters). Numbers, upper case letters and meta
characters are en couraged.
Once the password has been verified, passwd communicates the new
password information to the netinfo.device.
The super-user is not required to provide a user's current password.
FILES
SEE ALSO
login
Robert Morris, and Ken Thompson, UNIX password security.
HISTORY
A passwd command appeared in Version 6 AT&T UNIX.
netutil.doc/ping netutil.doc/ping
NAME
ping - send ICMP ECHO_REQUEST packets to network hosts
SYNOPSIS
ping [-dfnqrvR] [-c count] [-i wait] [-l preload] [-p pattern]
[-s packetsize] [-L [ hosts ]] host
DESCRIPTION
Ping uses the ICMP protocol's mandatory ECHO_REQUEST datagram to
elicit an ICMP ECHO_RESPONSE from a host or gateway. ECHO_REQUEST
datagrams (``pings'') have an IP and ICMP header, followed by a
``struct timeval'' and then an arbitrary number of ``pad'' bytes
used to fill out the packet. The options are as follows: Other
options are:
-c count
Stop after sending (and receiving) count ECHO_RESPONSE
packets.
-d Set the SO_DEBUG option on the socket being used.
-f Flood ping. Outputs packets as fast as they come back or
one hundred times per second, whichever is more. For every
ECHO_REQUEST sent a period ``.'' is printed, while for ever
ECHO_REPLY received a backspace is printed. This provides a
rapid display of how many packets are being dropped. Only
the super-user may use this option. This can be very hard
on a network and should be used with caution.
-i wait
Wait wait seconds between sending each packet. The default
is to wait for one second between each packet. This option
is incompatible with the -f option.
-L [hosts]
Use loose routing IP option. Includes IPOPT_LSRR option in
the ECHO_REQUEST packet with all specified hosts in the
route. Many hosts wont support loose routing, such a host
can either ignore or return the loose routed ICMP packet in
the middle of the route.
-l preload
If preload is specified, ping sends that many packets as
fast as possible before falling into its normal mode of
behavior.
-n Numeric output only. No attempt will be made to lookup
symbolic names for host addresses.
-p pattern
You may specify up to 16 ``pad'' bytes to fill out the
packet you send. This is useful for diagnosing
data-dependent problems in a network. For example, ``-p
ff'' will cause the sent packet to be filled with all ones.
-q Quiet output. Nothing is displayed except the summary lines
at startup time and when finished.
-R Record route. Includes the RECORD_ROUTE option in the
ECHO_REQUEST packet and displays the route buffer on
returned packets. Note that the IP header is only large
enough for nine such routes. Many hosts ignore or discard
this option.
-r Bypass the normal routing tables and send directly to a host
on an attached network. If the host is not on a
directly-attached network, an error is returned. This
option can be used to ping a local host through an interface
that has no route through it.
-s packetsize
Specifies the number of data bytes to be sent. The default
is 56, which translates into 64 ICMP data bytes when
combined with the 8 bytes of ICMP header data.
-v Verbose output. ICMP packets other than ECHO_RESPONSE that
are received are listed.
When using ping for fault isolation, it should first be run on the
local host, to verify that the local network interface is up and
running. Then, hosts and gateways further and further away should
be ``pinged''. Round-trip times and packet loss statistics are
computed. If duplicate packets are received, they are not included
in the packet loss calculation, although the round trip time of
these packets is used in calculating the minimum/average/maximum
round-trip time numbers. When the specified number of packets have
been sent (and received) or if the program is terminated with a
SIGINT, a brief summary is displayed.
This program is intended for use in network testing, measurement and
management. Because of the load it can impose on the network, it is
unwise to use ping during normal operations or from automated
scripts.
ICMP PACKET DETAILS
An IP header without options is 20 bytes. An ICMP ECHO_REQUEST
packet contains an additional 8 bytes worth of ICMP header followed
by an arbitrary amount of data. When a packetsize is given, this
indicated the size of this extra piece of data (the default is 56).
Thus the amount of data received inside of an IP packet of type ICMP
ECHO_REPLY will always be 8 bytes more than the requested data space
(the ICMP header).
If the data space is at least eight bytes large, ping uses the first
eight bytes of this space to include a timestamp which it uses in
the computation of round trip times. If less than eight bytes of
pad are specified, no round trip times are given.
DUPLICATE AND DAMAGED PACKETS
Ping will report duplicate and damaged packets. Duplicate packets
should never occur, and seem to be caused by inappropriate
link-level retransmissions. Duplicates may occur in many situations
and are rarely (if ever) a good sign, although the presence of low
levels of duplicates may not always be cause for alarm.
Damaged packets are obviously serious cause for alarm and often
indicate broken hardware somewhere in the ping packet's path (in the
network or in the hosts).
TRYING DIFFERENT DATA PATTERNS
The (inter)network layer should never treat packets differently
depending on the data contained in the data portion. Unfortunately,
data-dependent problems have been known to sneak into networks and
remain undetected for long periods of time. In many cases the
particular pattern that will have problems is something that doesn't
have sufficient ``transitions'', such as all ones or all zeros, or a
pattern right at the edge, such as almost all zeros. It isn't
necessarily enough to specify a data pattern of all zeros (for
example) on the command line because the pattern that is of interest
is at the data link level, and the relationship between what you
type and what the controllers transmit can be complicated.
This means that if you have a data-dependent problem you will
probably have to do a lot of testing to find it. If you are lucky,
you may manage to find a file that either can't be sent across your
network or that takes much longer to transfer than other similar
length files. You can then examine this file for repeated patterns
that you can test using the -p option of ping.
TTL DETAILS
The TTL value of an IP packet represents the maximum number of IP
routers that the packet can go through before being thrown away. In
current practice you can expect each router in the Internet to
decrement the TTL field by exactly one.
The TCP/IP specification states that the TTL field for TCP packets
should be set to 60, but many systems use smaller values (4.3 BSD
uses 30, 4.2 used 15). The AmiTCP/IP uses normally TTL value 30.
The maximum possible value of this field is 255, and most systems
set the TTL field of ICMP ECHO_REQUEST packets to 255. This is why
you will find you can ``ping'' some hosts, but not reach them with
telnet or ftp.
In normal operation ping prints the ttl value from the packet it re-
ceives. When a remote system receives a ping packet, it can do one
of three things with the TTL field in its response:
· Not change it; this is what Berkeley Unix systems did before the
4.3BSD-Tahoe release. In this case the TTL value in the
received packet will be 255 minus the number of routers in the
round-trip path.
· Set it to 255; this is what AmiTCP/IP and current Berkeley Unix
systems do. In this case the TTL value in the received packet
will be 255 minus the number of routers in the path from the
remote system to the pinging host.
· Set it to some other value. Some machines use the same value
for ICMP packets that they use for TCP packets, for example
either 30 or 60. Others may use completely wild values.
LOOSE SOURCE ROUTING DETAILS
When a packet is routed with loose routing in IP, the destination
address of datagram is originally set to the first address in the
routing list. When the datagram reaches its destination, the
destination address is changed to the next address in the list and
the datagram is routed to that destination. After the whole routing
list is exhausted, the datagram is handled to upper-level protocols.
The loose routing options can be ignored by hosts between the
gateways in the loose routing list. However, if the host in the
list don't understand loose routing, it may think that the datagram
is destined to it and respond to it. Also, many hosts simply drop
the packets with IP options.
BUGS
Many Hosts and Gateways ignore the RECORD_ROUTE and
LOOSE_SOURCE_ROUTING options.
The maximum IP header length is too small for options like
RECORD_ROUTE to be completely useful. There's not much that that
can be done about this, however.
Flood pinging is not recommended in general, and flood pinging the
broadcast address should only be done under very controlled
conditions.
SEE ALSO
netstat, ifconfig
AUTHOR
Mike Muuss, U. S. Army Ballistic Research Laboratory, December, 1983
The ping command appeared in 4.3BSD.
The loose routing and working record route options were added by
Pekka Pessi, AmiTCP/IP Group, Helsinki Univ. of Technology.
netutil.doc/portmap netutil.doc/portmap
NAME
portmap - DARPA port to RPC program number mapper
SYNOPSIS
AmiTCP:bin/portmap
DESCRIPTION
`portmap' is a server that converts RPC program numbers into DARPA
protocol port numbers. It must be running in order to make RPC
calls. When an RPC server is started, it will tell `portmap' what
port number it is listening to, and what RPC program numbers it is
prepared to serve. When a client wishes to make an RPC call to a
given program number, it will first contact `portmap' on the
server machine to determine the port number where RPC packets
should be sent. Normally, standard RPC servers are started by
`inetd', so `portmap' must be started before `inetd' is invoked.
SEE ALSO
netutil.doc/rpcinfo
BUGS
If `portmap' crashes, all servers must be restarted.
netutil.doc/resolve netutil.doc/resolve
NAME
resolve --- resolve Inet address, protocol or port number
TEMPLATE
resolve NET/S,IPADDR,PROTOCOL/N/K,TCP/S,UDP/S,PORT/K/N
DESCRIPTION
Resolve resolves Internet address, network number, protocol number
or port number. Host addresses are resolved by Domain name server,
if your host is using one. Other queries are looked up from the
local AmiTCP/IP network database (see file AmiTCP:db/netdb).
The resolve can be given following command line arguments:
NET/S The IPADDR is regarded as network address instead of
host address.
IPADDR The Internet address in standard dot notation to
resolve.
PROTOCOL/N/K The Internet protocol number.
PORT/K/N The port number in the range 0 -- 65535. A port
number and protocol identifies an Internet service
uniquely.
TCP/S Look up a service using TCP protocol (default).
UDP/S Look up a service using UDP protocol.
DIAGNOSTICS
If the command line arguments are erroneous or Resolve cannot open
beeded libraries, an short diagnostic message is printed and Resolve
returns 20 to indicate failure.
If resolving error occurs, an short diagnostic message is printed
and Resolve returns 10 to indicate error.
EXAMPLES
BUGS
The template syntax is confusing.
SEE ALSO
getnetbyaddr(), gethostbyaddr(), getprotobynumber(), getservbyport()
netutil.doc/route netutil.doc/route
NAME
route - manually manipulate the routing tables
SYNOPSIS
route [-n] [-q] [-v] command [modifiers] destination gateway
DESCRIPTION
Route is a program used to manually manipulate the network routing
tables.
Options supported by route:
-n Prevent attempts to print host and network names
symbolically when reporting actions.
-v (verbose) Print additional details.
-q Suppress all output.
Commands accepted by route:
add Add a route.
delete Delete a specific route.
The destination is the destination host or network, gateway is the
next-hop gateway to which packets should be addressed. Routes to a
particular host are distinguished from those to a network by
interpreting the Internet address associated with destination. The
optional modifiers -net and -host force the destination to be
interpreted as a network or a host, respectively. Otherwise, if the
destination has a ``local address part'' of INADDR_ANY, or if the
destination is the symbolic name of a network, then the route is
assumed to be to a network; otherwise, it is presumed to be a route
to a host.
For example, 128.32 is interpreted as -host 128.0.0.32; 128.32.130
is interpreted as -host 128.32.0.130; -net 128.32 is interpreted as
128.32.0.0; and -net 128.32.130 is interpreted as 128.32.130.0.
To add a default route, give the destination as 'default'.
If the route is via an interface rather than via a gateway, the
-interface modifier should be specified; the gateway given is the
address of this host on the common network, indicating the interface
to be used for transmission.
The optional -netmask qualifier is used to specify the netmask of
the interface. One specifies an additional ensuing address parameter
(to be interpreted as a network mask). The implicit network mask
generated can be overridden by making sure this option follows the
destination parameter.
All symbolic names specified for a destination or gateway are looked
up first as a host name using gethostbyname(). If this lookup fails,
getnetbyname() is then used to interpret the name as that of a
network.
DIAGNOSTICS
add [host | network ] %s: gateway %s flags %x
The specified route is being added to the tables. The values
printed are from the routing table entry supplied in the
IoctlSocket() call. If the gateway address used was not the
primary address of the gateway (the first one returned by
gethostbyname()), the gateway address is printed numerically
as well as symbolically.
delete [ host | network ] %s: gateway %s flags %x
As above, but when deleting an entry.
Network is unreachable
An attempt to add a route failed because the gateway listed
was not on a directly-connected network. The next-hop
gateway must be given.
not in table
A delete operation was attempted for an entry which wasn't
present in the tables.
routing table overflow
An add operation was attempted, but the system was low on
resources and was unable to allocate memory to create the
new entry.
SEE ALSO
ifconfig, protocols/routing
HISTORY
The route command appeared in 4.2BSD.
netutil.doc/rpcinfo netutil.doc/rpcinfo
NAME
rpcinfo - report RPC information
SYNOPSIS
`rpcinfo -p [ host ]'
`rpcinfo [ -n portnum ] -u host program [ version ]'
`rpcinfo [ -n portnum ] -t host program [ version ]'
`rpcinfo -b program version'
`rpcinfo -d program version'
DESCRIPTION
`rpcinfo' makes an RPC call to an RPC server and reports what it
finds.
OPTIONS
`-p' Probe the portmapper on host, and print a list of all
registered RPC programs. If host is not specified, it
defaults to the value returned by `gethostname()'.
`-u' Make an RPC call to procedure 0 of program on the specified
host using UDP, and report whether a response was received.
`-t' Make an RPC call to procedure 0 of program on the specified
host using TCP, and report whether a response was received.
`-n' Use `portnum' as the port number for the `-t' and `-u'
options instead of the port number given by the portmapper.
`-b' Make an RPC broadcast to procedure 0 of the specified program
and version using UDP and report all hosts that respond.
`-d' Delete registration for the RPC service of the specified
program and version. This option can be exercised only by
the superuser. The program argument can be either a name or
a number. If a version is specified, `rpcinfo' attempts to
call that version of the specified program. Otherwise,
rpcinfo attempts to find all the registered version numbers
for the specified program by calling version 0 (which is
presumed not to exist; if it does exist, rpcinfo attempts to
obtain this information by calling an extremely high version
number instead) and attempts to call each registered version.
*Note:* the version number is required for -b and -d options.
EXAMPLES
To show all of the RPC services registered on the local machine
use:
example% rpcinfo -p
To show all of the RPC services registered on the machine named
klaxon use:
example% rpcinfo -p klaxon
To show all machines on the local net that are running the Yellow
Pages service use:
example% rpcinfo -b ypserv 'version' | uniq
where '`version'' is the current Yellow Pages version obtained
from the results of the `-p' switch above.
To delete the registration for version 1 of the `walld' service
use:
example% rpcinfo -d walld 1
SEE ALSO
AmiTCP:db/rpc, netutil.doc/portmap
netutil.doc/rsh netutil.doc/rsh
NAME
rsh - remote shell
VERSION
$Id: rsh.c,v 5.10 1994/10/04 18:27:04 jraja Exp $
SYNOPSIS
rsh [-n] [-l username] host [command]
DESCRIPTION
Rsh executes command on remote Unix host.
Rsh copies its standard input to the remote command, the standard
output of the remote command to its standard output, and the
standard error of the remote command to its standard error. Break
signals C, E and F are propagated to the remote command as
interrupt, quit and terminate signals, respectively; rsh normally
terminates when the remote command does. The options are as follows:
-l By default, the remote username is the same as the local
username. The -l option allows the remote name to be
specified. Authorization is determined as in rlogin(1).
-n The -n option redirects input from the special device NIL:
If no command is specified, you will be logged in on the remote host
using rlogin.
Shell metacharacters which are not quoted are interpreted on local
machine, while quoted metacharacters are interpreted on the remote
machine. For example, the command
rsh otherhost cat remotefile >> localfile
appends the remote file remotefile to the local file localfile,
while
rsh otherhost cat remotefile ">>" other_remotefile
appends remotefile to other_remotefile.
SEE ALSO
rlogin
HISTORY
The rsh command appeared in 4.2BSD.
netutil.doc/traceroute netutil.doc/traceroute
NAME
traceroute - print the route packets take to network host
SYNOPSIS
traceroute [ -m max_ttl ] [ -n ] [ -p port ] [ -q nqueries ] [ -r ]
[ -s src_addr ] [ -t tos ] [ -w ] [ -w waittime ] host
[ packetsize ]
DESCRIPTION
The Internet is a large and complex aggregation of network hardware,
connected together by gateways. Tracking the route one's packets
follow (or finding the miscreant gateway that's discarding your
packets) can be difficult. Traceroute utilizes the IP protocol `time
to live' field and attempts to elicit an ICMP TIME_EXCEEDED response
from each gateway along the path to some host.
The only mandatory parameter is the destination host name or IP
number. The default probe datagram length is 38 bytes, but this may
be increased by specifying a packet size (in bytes) after the
destination host name.
Other options are:
-m Set the max time-to-live (max number of hops) used in outgoing
probe packets. The default is 30 hops (the same default used
for TCP connections).
-n Print hop addresses numerically rather than symbolically and
numerically (saves a nameserver address-to-name lookup for
each gateway found on the path).
-p Set the base UDP port number used in probes (default is
33434). Traceroute hopes that nothing is listening on UDP
ports base to base+nhops-1 at the destination host (so an ICMP
PORT_UNREACHABLE message will be returned to terminate the
route tracing). If something is listening on a port in the
default range, this option can be used to pick an unused port
range.
-r Bypass the normal routing tables and send directly to a host
on an attached network. If the host is not on a directly-
attached network, an error is returned. This option can be
used to ping a local host through an interface that has no
route through it (e.g., after the interface was dropped by
routed).
-s Use the following IP address (which must be given as an IP
number, not a hostname) as the source address in outgoing
probe packets. On hosts with more than one IP address, this
option can be used to force the source address to be something
other than the IP address of the interface the probe packet is
sent on. If the IP address is not one of this machine's
interface addresses, an error is returned and nothing is sent.
-t Set the type-of-service in probe packets to the following
value (default zero). The value must be a decimal integer in
the range 0 to 255. This option can be used to see if
different types-of-service result in different paths. (If
you are not running 4.4bsd, this may be academic since the
normal network services like telnet and ftp don't let you
control the TOS). Not all values of TOS are legal or
meaningful - see the IP spec for definitions. Useful values
are probably `-t 16' (low delay) and `-t 8' (high throughput).
-v Verbose output. Received ICMP packets other than
TIME_EXCEEDED and UNREACHABLEs are listed.
-w Set the time (in seconds) to wait for a response to a probe
(default 3 sec.).
This program attempts to trace the route an IP packet would follow to
some internet host by launching UDP probe packets with a small ttl
(time to live) then listening for an ICMP "time exceeded" reply from
a gateway. We start our probes with a ttl of one and increase by one
until we get an ICMP "port unreachable" (which means we got to
"host") or hit a max (which defaults to 30 hops & can be changed with
the -m flag). Three probes (change with -q flag) are sent at each
ttl setting and a line is printed showing the ttl, address of the
gateway and round trip time of each probe. If the probe answers come
from different gateways, the address of each responding system will
be printed. If there is no response within a 3 sec. timeout
interval (changed with the -w flag), a "*" is printed for that probe.
We don't want the destination host to process the UDP probe packets
so the destination port is set to an unlikely value (if some clod on
the destination is using that value, it can be changed with the -p
flag).
A sample use and output might be:
[yak 71]% traceroute nis.nsf.net.
traceroute to nis.nsf.net (35.1.1.48), 30 hops max, 56 byte packet
1 helios.ee.lbl.gov (128.3.112.1) 19 ms 19 ms 0 ms
2 lilac-dmc.Berkeley.EDU (128.32.216.1) 39 ms 39 ms 19 ms
3 lilac-dmc.Berkeley.EDU (128.32.216.1) 39 ms 39 ms 19 ms
4 ccngw-ner-cc.Berkeley.EDU (128.32.136.23) 39 ms 40 ms 39 ms
5 ccn-nerif22.Berkeley.EDU (128.32.168.22) 39 ms 39 ms 39 ms
6 128.32.197.4 (128.32.197.4) 40 ms 59 ms 59 ms
7 131.119.2.5 (131.119.2.5) 59 ms 59 ms 59 ms
8 129.140.70.13 (129.140.70.13) 99 ms 99 ms 80 ms
9 129.140.71.6 (129.140.71.6) 139 ms 239 ms 319 ms
10 129.140.81.7 (129.140.81.7) 220 ms 199 ms 199 ms
11 nic.merit.edu (35.1.1.48) 239 ms 239 ms 239 ms
Note that lines 2 & 3 are the same. This is due to a buggy kernel on
the 2nd hop system - lbl-csam.arpa - that forwards packets with a
zero ttl (a bug in the distributed version of 4.3BSD). Note that you
have to guess what path the packets are taking cross-country since
the NSFNet (129.140) doesn't supply address-to-name translations for
its NSSes.
A more interesting example is:
[yak 72]% traceroute allspice.lcs.mit.edu.
traceroute to allspice.lcs.mit.edu (18.26.0.115), 30 hops max
1 helios.ee.lbl.gov (128.3.112.1) 0 ms 0 ms 0 ms
2 lilac-dmc.Berkeley.EDU (128.32.216.1) 19 ms 19 ms 19 ms
3 lilac-dmc.Berkeley.EDU (128.32.216.1) 39 ms 19 ms 19 ms
4 ccngw-ner-cc.Berkeley.EDU (128.32.136.23) 19 ms 39 ms 39 ms
5 ccn-nerif22.Berkeley.EDU (128.32.168.22) 20 ms 39 ms 39 ms
6 128.32.197.4 (128.32.197.4) 59 ms 119 ms 39 ms
7 131.119.2.5 (131.119.2.5) 59 ms 59 ms 39 ms
8 129.140.70.13 (129.140.70.13) 80 ms 79 ms 99 ms
9 129.140.71.6 (129.140.71.6) 139 ms 139 ms 159 ms
10 129.140.81.7 (129.140.81.7) 199 ms 180 ms 300 ms
11 129.140.72.17 (129.140.72.17) 300 ms 239 ms 239 ms
12 * * *
13 128.121.54.72 (128.121.54.72) 259 ms 499 ms 279 ms
14 * * *
15 * * *
16 * * *
17 * * *
18 ALLSPICE.LCS.MIT.EDU (18.26.0.115) 339 ms 279 ms 279 ms
Note that the gateways 12, 14, 15, 16 & 17 hops away either don't
send ICMP "time exceeded" messages or send them with a ttl too small
to reach us. 14 - 17 are running the MIT C Gateway code that doesn't
send "time exceeded"s. God only knows what's going on with 12.
The silent gateway 12 in the above may be the result of a bug in the
4.[23]BSD network code (and its derivatives): 4.x (x <= 3) sends an
unreachable message using whatever ttl remains in the original
datagram. Since, for gateways, the remaining ttl is zero, the ICMP
"time exceeded" is guaranteed to not make it back to us. The
behavior of this bug is slightly more interesting when it appears on
the destination system:
1 helios.ee.lbl.gov (128.3.112.1) 0 ms 0 ms 0 ms
2 lilac-dmc.Berkeley.EDU (128.32.216.1) 39 ms 19 ms 39 ms
3 lilac-dmc.Berkeley.EDU (128.32.216.1) 19 ms 39 ms 19 ms
4 ccngw-ner-cc.Berkeley.EDU (128.32.136.23) 39 ms 40 ms 19 ms
5 ccn-nerif35.Berkeley.EDU (128.32.168.35) 39 ms 39 ms 39 ms
6 csgw.Berkeley.EDU (128.32.133.254) 39 ms 59 ms 39 ms
7 * * *
8 * * *
9 * * *
10 * * *
11 * * *
12 * * *
13 rip.Berkeley.EDU (128.32.131.22) 59 ms ! 39 ms ! 39 ms !
Notice that there are 12 "gateways" (13 is the final destination) and
exactly the last half of them are "missing". What's really happening
is that rip (a Sun-3 running Sun OS3.5) is using the ttl from our
arriving datagram as the ttl in its ICMP reply. So, the reply will
time out on the return path (with no notice sent to anyone since
ICMP's aren't sent for ICMP's) until we probe with a ttl that's at
least twice the path length. I.e., rip is really only 7 hops away.
A reply that returns with a ttl of 1 is a clue this problem exists.
Traceroute prints a "!" after the time if the ttl is <= 1. Since
vendors ship a lot of obsolete (DEC's Ultrix, Sun 3.x) or
non-standard (HPUX) software, expect to see this problem frequently
and/or take care picking the target host of your probes.
Other possible annotations after the time are !H, !N, !P (got a host,
network or protocol unreachable, respectively), !S or !F (source
route failed or fragmentation needed - neither of these should ever
occur and the associated gateway is busted if you see one). If
almost all the probes result in some kind of unreachable, traceroute
will give up and exit.
This program is intended for use in network testing, measurement and
management. It should be used primarily for manual fault isolation.
Because of the load it could impose on the network, it is unwise to
use traceroute during normal operations or from automated scripts.
AUTHOR
Implemented by Van Jacobson from a suggestion by Steve Deering.
Debugged by a cast of thousands with particularly cogent suggestions
or fixes from C. Philip Wood, Tim Seaver and Ken Adelman.
SEE ALSO
netstat, ping
netutil.doc/whoami netutil.doc/whoami
NAME
whoami - prints effective current user id
VERSION
$Id: whoami.c,v 4.1 1994/10/04 18:28:12 jraja Exp $
TEMPLATE
whoami
FUNCTION
Whoami prints your effective user id. It works even if you are
su'd.
RETURN VALUE
Whoami return WARN, if the user id has got no user name associated.
SEE ALSO
id